Skip to content

[Feature] Temporal Pipeline Parallelism & Stream Batch for Real-Time Video#3099

Open
mnasser02 wants to merge 56 commits into
vllm-project:mainfrom
zzhang-fr:stream-diffusion
Open

[Feature] Temporal Pipeline Parallelism & Stream Batch for Real-Time Video#3099
mnasser02 wants to merge 56 commits into
vllm-project:mainfrom
zzhang-fr:stream-diffusion

Conversation

@mnasser02
Copy link
Copy Markdown

@mnasser02 mnasser02 commented Apr 24, 2026

Purpose

Related issue: #2280.

Tested on Lingbot #3701 (not merged yet).

Implements:

  • SupportsMicroStepExecution on LingbotWorldFastPipeline with StreamVAE
  • micro-step execution path with async comms, double-buffering, compute/comm overlap
  • StreamBatchScheduler driving micro-step execution pipeline, with SLO-adaptive batch size

Not in scope:

  • motion-aware noise controller, adaptive sink tokens, RoPE offset reset
  • VAE-as-stage / run-time adaptive scheduling of transformer blocks across PP stages
  • Benchmarks vs SP baseline, PP×SP hybrid (SP not supported by Lingbot)

Test Plan

pytest -v \
tests/diffusion/test_diffusion_micro_step_pipeline.py \
tests/diffusion/test_diffusion_scheduler.py::TestStreamBatchScheduler

Test Result

  • Unit tests: 31 passed, 17 warnings

  • E2E on A100s:

Latency

Each cell: e2e_s / ttff_s (seconds).

A chunk is 12 pixel frames.

num_chunks=1 4 8 12 16 20
GPUs=1 7.0s / 7.0s 32.9s / 24.6s OOM OOM OOM OOM
2 7.5s / 7.5s 21.2s / 16.3s 45.7s / 28.3s OOM OOM OOM
3 8.0s / 7.9s 20.7s / 16.7s 38.9s / 26.5s 60.0s / 34.4s OOM OOM
4 8.4s / 8.4s 15.0s / 10.6s 32.7s / 21.9s 51.8s / 31.5s 72.3s / 39.2s 95.0s / 44.9s

Per-rank occupancy (PP=4, num_chunks=20)

occupancy_pp4_c20

Throughput vs GPU count

fps_vs_gpus

Micro-step latency distribution (PP=4, num_chunks=10)

latency_hist_pp4_c10

PP=4, num_chunks=20

pp4_c20.mp4

Differences in the output from the original can be noticed since chunks can attend to previous chunks that aren't at their final denoising step.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan. Please provide the test scripts & test commands. Please state the reasons if your codes don't require additional test scripts. For test file guidelines, please check the test style doc
  • The test results. Please paste the results comparison before and after, or the e2e results.
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model. Please run mkdocs serve to sync the documentation editions to ./docs.
  • (Optional) Release notes update. If your change is user-facing, please update the release notes draft.

BEFORE SUBMITTING, PLEASE READ https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md (anything written below this line will be removed by GitHub Actions)

@hsliuustc0106
Copy link
Copy Markdown
Collaborator

Ready for full review when WIP status is removed. Preliminary scan available on request.

Note: Test plan and test results sections are currently empty. Please provide:

  1. Test scripts & commands for the new pipeline parallelism and stream batch scheduler
  2. E2e test results demonstrating the 40+ FPS target on 4×H100 with sub-500ms TTFF
  3. Benchmark comparisons against SP baseline and PP×SP hybrid

Miguel0312 and others added 26 commits May 18, 2026 14:10
Signed-off-by: Miguel Vieira Pereira <miguel.vpereira14@gmail.com>

Implement Lingbot World Transformer into vllm-omni

Signed-off-by: Miguel Vieira Pereira <miguel.vpereira14@gmail.com>

Implement KV cache abstraction for Lingbot World Fast

Add script to offline generation using Lingbot World Fast

Implement online serving for Lingbot World and camera-based world models in general
Implement SupportsStepExecution protocol on Wan22Pipeline, decomposing the monolithic forward() into prepare_encode, denoise_step,step_scheduler, and post_decode. Add denoise_micro_step for temporal PP.

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
>> Different ranks work on different chunks. A context manager that views the req state of a rank as a chunk state allows benefitting from existing functionalities.

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
…ed task

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
… pipeline (B and T hardcoded for now)

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
…instead of sync send/recv

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Plain P2P on size-2 PG triggers lazy sub-comm creation that requires the peer present.

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
@amy-why-3459 amy-why-3459 mentioned this pull request May 26, 2026
19 tasks
Miguel0312 and others added 4 commits May 26, 2026 09:36
Signed-off-by: Miguel Vieira Pereira <miguel.vpereira14@gmail.com>
Signed-off-by: Miguel Vieira Pereira <52176659+Miguel0312@users.noreply.github.com>

Signed-off-by: Miguel Vieira Pereira <miguel.vpereira14@gmail.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Miguel Vieira Pereira <miguel.vpereira14@gmail.com>
@asukaqaq-s
Copy link
Copy Markdown
Contributor

Hi, may I ask if there is an estimated plan for merging this PR? I have some features that need to be built on top of it.

@mnasser02
Copy link
Copy Markdown
Author

mnasser02 commented May 27, 2026

@asukaqaq-s @fhfuih

Currently, the core functionality of StreamDiffusionV2 (temporal PP through micro-step execution path and StreamBatchScheduler) should be almost ready. However, we can't test it properly since causal Wan isn't available in vllm-omni (in the paper, SDV2 builds on CausVid applied to Wan); not sure if this is being worked on, or this can be left for a future PR.

We have done some tests on a not-so-correct V2V adaptation of Wan2.1-T2V-1.3B to ensure functionality. I think that before the end of this week, we can open the PR (after a cleaning the code a bit) and share our preliminary results.

Update: we decided to test on Lingbot #3701

mnasser02 added 6 commits May 28, 2026 12:10
…ream-diffusion

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
@mnasser02 mnasser02 changed the title [WIP][Feature] Temporal Pipeline Parallelism & Stream Batch for Real-Time Video [Feature] Temporal Pipeline Parallelism & Stream Batch for Real-Time Video May 30, 2026
@mnasser02 mnasser02 marked this pull request as ready for review May 30, 2026 00:09
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@hsliuustc0106
Copy link
Copy Markdown
Collaborator

resolve conflicts please

…diffusion

Signed-off-by: Mahdi Nasser <94046147+mnasser02@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants